package com.hh.designPrinciples.OpenigClosing;

/**
 * @author huangh
 * @since 2019/11/12
 */
public class JavaDiscountCourse extends JavaCourse{

    public JavaDiscountCourse(Integer id, String name, Double price) {
        super(id, name, price);
    }

    @Override
    public String getName() {
        return super.getName();
    }

    @Override
    public Double getPrice() {
        return super.getPrice() * 0.8;
    }

    /** 获取原价 */
    public Double getOriginPrice() {
        return super.getPrice();
    }
}
